package com.zoo.wuhua.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.zoo.wuhua.entity.Book;
import com.zoo.wuhua.log.Trace;
import com.zoo.wuhua.service.BookService;

/**
 * @description
 * @author zhangli7@yusys.com.cn
 * @since 2020年2月15日 下午10:45:48 v1.0
 */
@RestController
public class BookController {

    @Autowired
    BookService bookService;

    @GetMapping("/addBook")
    public void addBook() {
        Book book = new Book("魔道祖师", "墨香铜臭", 38.00);
        int count = bookService.addBook(book);
        Trace.debug("已向Book表添加" + count + "条记录");
    }
}
